package ua.edu.nuos.jeetraining2012.cms.dto;

import java.util.Date;

/**
 * Detailed info about homework.
 *
 * @author Victor N. Ganichev victor.ganichev@gmail.com
 * @version 1.0 Date: 27.06.13 Time: 12:36
 * @since 1.0
 */
public class HomeWorkDetailedDTO {

    /** Define HW title. */
    private String homeWorkTitle;

    /** Define Homework ID */
    private Long homeWorkId;

    /** Define homework description. */
    private String homeWorkDescription;

    /** Define file Url. */
    private String fileUrl;

    /** Define homework start date. */
    private Date homeWorkStartDate;

    /** Define deadline. */
    private Date homeWorkFinishDate;

    /** Define course ID. */
    private Long courseId;

    /** Define max possible scores for homework complete. */
    private int homeWorkMaxScores = 0;

    // Constructor
    public HomeWorkDetailedDTO() {}

    // Getters & Setters
    public String getHomeWorkTitle() {
        return homeWorkTitle;
    }

    public void setHomeWorkTitle(String homeWorkTitle) {
        this.homeWorkTitle = homeWorkTitle;
    }

    public Long getHomeWorkId() {
        return homeWorkId;
    }

    public void setHomeWorkId(Long homeWorkId) {
        this.homeWorkId = homeWorkId;
    }

    public String getHomeWorkDescription() {
        return homeWorkDescription;
    }

    public void setHomeWorkDescription(String homeWorkDescription) {
        this.homeWorkDescription = homeWorkDescription;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public Date getHomeWorkStartDate() {
        return homeWorkStartDate;
    }

    public void setHomeWorkStartDate(Date homeWorkStartDate) {
        this.homeWorkStartDate = homeWorkStartDate;
    }

    public Date getHomeWorkFinishDate() {
        return homeWorkFinishDate;
    }

    public void setHomeWorkFinishDate(Date homeWorkFinishDate) {
        this.homeWorkFinishDate = homeWorkFinishDate;
    }

    public int getHomeWorkMaxScores() {
        return homeWorkMaxScores;
    }

    public void setHomeWorkMaxScores(int homeWorkMaxScores) {
        this.homeWorkMaxScores = homeWorkMaxScores;
    }

    public Long getCourseId() {
        return courseId;
    }

    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }

    // Overrides

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        HomeWorkDetailedDTO that = (HomeWorkDetailedDTO) o;

        if (homeWorkId != null ? !homeWorkId.equals(that.homeWorkId) : that.homeWorkId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return homeWorkId != null ? homeWorkId.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "HomeWorkDetailedDTO{" +
                "homeWorkId=" + homeWorkId +
                ", homeWorkDescription='" + homeWorkDescription + '\'' +
                ", fileUrl='" + fileUrl + '\'' +
                ", homeWorkStartDate=" + homeWorkStartDate +
                ", homeWorkFinishDate=" + homeWorkFinishDate +
                ", courseId=" + courseId +
                ", homeWorkMaxScores=" + homeWorkMaxScores +
                '}';
    }
}
